Page({
  data: {
    visitorList: []
  },
  onLoad() {
    this.getVisitorList()
  },
  async getVisitorList() {
    const res = await wx.http.get('/visitor', {
      current: 1,
      pageSize: 10
    })
    if (res.code !== 10000) return wx.utils.toast()
    this.setData({
      visitorList: res.data.rows
    })
  },

  goPassport(e) {
    wx.navigateTo({
      url: '/visitor_pkg/pages/passport/index?id=' + e.mark.id,
    })
  },
})